<?php

namespace Database\Factories;

use App\Models\IntegralProduct;
use Illuminate\Database\Eloquent\Factories\Factory;

class IntegralProductFactory extends Factory
{
    /**
     * The name of the factory's corresponding model.
     *
     * @var string
     */
    protected $model = IntegralProduct::class;

    /**
     * Define the model's default state.
     *
     * @return array
     */
    public function definition()
    {
        return [
            'product_id' => $this->faker->numberBetween(1),
            'merchant_id' => $this->faker->numberBetween(1),
            'recommend_image' => "https://placeimg.com/400/400/any",
            'title' => $this->faker->text(20),
            'rotation_chart' => ['https://placeimg.com/400/400/any','https://placeimg.com/400/400/any','https://placeimg.com/400/400/any'],
            'shel_status' => $this->faker->numberBetween(0, 1),
            'description' => $this->faker->text(40),
            'unit_name' => $this->faker->text(10),
            'integral' =>$this->faker->randomFloat(2, 0, 50),
            'sort' => $this->faker->numberBetween(0, 100),
            'sales' => $this->faker->numberBetween(0, 100),
            'stock' => $this->faker->numberBetween(0, 100),
            'postage' => $this->faker->randomFloat(2, 0, 30),
            'browse' =>  $this->faker->numberBetween(50, 200),
            'weight' => $this->faker->numberBetween(20, 200),
            'volume' => $this->faker->numberBetween(20, 200),
            'num' => $this->faker->numberBetween(1, 50),
            'once_num' => $this->faker->numberBetween(1, 20),
            'is_recommend' => $this->faker->numberBetween(0, 1),
            'merchant_use' => $this->faker->numberBetween(0, 1),
        ];
    }
}
